package com.eds.feign;

import com.eds.pojo.BaseResult;
import com.pojo.OssImage;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;

/**
 * Created with IntelliJ IDEA.
 *
 * @ClassName：OssFeign
 * @Author: vvSmile
 * @Date: 2025/03/18
 * @Description: 必须描述类做什么事情, 实现什么功能
 */
@FeignClient("eds-upload")
public interface OssFeign {
    //上传文件到Oss服务
    @PostMapping(value = "/fileManager/uploadImage", consumes = MediaType.MULTIPART_FORM_DATA_VALUE)
    public BaseResult upload(@RequestPart("file") MultipartFile file);

    //删除文件
    @DeleteMapping("/fileManager/delete")
    public BaseResult delete(@RequestParam("filePath") String filePath);

    @GetMapping("/fileManager/getDefaultImage")
    public OssImage getDefaultImage();
}
